{if !empty($diyitem['data'])}
    {php $textyuan = !empty($_W['shopset']['commission']['texts']['yuan'])?$_W['shopset']['commission']['texts']['yuan']:'元'}
    {php $textjifen = !empty($_W['shopset']['trade']['credittext'])?$_W['shopset']['trade']['credittext']:'积分'}
    {if empty($diyitem['params']['goodsscroll'])}
        <div class="fui-goods-group {$diyitem['style']['liststyle']}" style="background: {$diyitem['style']['background']};">
            {loop $diyitem['data'] $goodsitem}
                <a class="fui-goods-item" data-goodsid="{$goodsitem['gid']}" href="{php echo mobileUrl(empty($diyitem['params']['goodstype'])?'goods/detail':'creditshop/detail', array('id'=>$goodsitem['gid']))}" data-nocache="true" style="position: relative;">
                    <div class="image" data-lazy-background="{php echo tomedia($goodsitem['thumb'])}">
                        {if $diyitem['params']['showicon']==1 || $diyitem['params']['showicon']==2}
                            <div class="goodsicon {$diyitem['params']['iconposition']}"
                                 {if $diyitem['params']['iconposition']=='left top'}
                                    style="top: {$diyitem['style']['iconpaddingtop']}px; left: {$diyitem['style']['iconpaddingleft']}px; text-align: left;"
                                 {elseif $diyitem['params']['iconposition']=='right top'}
                                    style="top: {$diyitem['style']['iconpaddingtop']}px; right: {$diyitem['style']['iconpaddingleft']}px; text-align: right;"
                                 {elseif $diyitem['params']['iconposition']=='left bottom'}
                                    style="bottom: {$diyitem['style']['iconpaddingtop']}px; left: {$diyitem['style']['iconpaddingleft']}px; text-align: left;"
                                 {elseif $diyitem['params']['iconposition']=='left bottom'}
                                    style="bottom: {$diyitem['style']['iconpaddingtop']}px; right: {$diyitem['style']['iconpaddingleft']}px; text-align: right;"
                                 {/if}
                            >
                                {if $diyitem['params']['showicon']==1}
                                    <img src="../addons/ewei_shopv2/plugin/diypage/static/images/default/goodsicon-{$diyitem['style']['goodsicon']}.png" style="width: {$diyitem['style']['iconzoom']}%;" />
                                {elseif $diyitem['params']['showicon']==2 && !empty($diyitem['params']['goodsiconsrc'])}
                                    <img src="{php echo tomedia($diyitem['params']['goodsiconsrc'])}" onerror="this.src=''" style="width: {$diyitem['style']['iconzoom']}%;" />
                                {/if}
                            </div>
                        {/if}
                    </div>
                    {if $diyitem['params']['showtitle']==1 || $diyitem['params']['showprice']==1}
                        <div class="detail">
                            {if $diyitem['params']['showtitle']==1}
                                <div class="name" style="color: {$diyitem['style']['titlecolor']};">
                                    {if $goodsitem['bargain']>0}
                                        <label style="background-color: {$diyitem['style']['buybtncolor']}; padding: 0px 2px; color: #fff; font-size: 0.6rem">砍价</label>
                                    {/if}
                                    {if !empty($diyitem['params']['goodstype']) && $diyitem['params']['showtag']>0}
                                        <label style="background-color: {$diyitem['style']['tagbackground']}; padding: 0px 2px; color: #fff; font-size: 0.6rem">{if $diyitem['params']['showtag']==1&&$goodsitem['productprice']>0}￥{$goodsitem['productprice']}{elseif $diyitem['params']['showtag']==2}{if $goodsitem['gtype']==0}商品{elseif $goodsitem['gtype']==1}优惠券{elseif $goodsitem['gtype']==2}余额{elseif $goodsitem['gtype']==3}红包{/if}{elseif $diyitem['params']['showtag']==3}{if $goodsitem['ctype']==1}抽奖{else}兑换{/if}{/if}</label>
                                    {/if}
                                    {$goodsitem['title']}
                                </div>
                            {/if}
                            {if $diyitem['params']['showprice']==1}
                                <div class="price" {if empty($diyitem['params']['goodstype'])}style="border-top: 1px dashed #eee;"{/if}>
                                    <span class="text" style="color: {$diyitem['style']['pricecolor']};">
                                        {if empty($diyitem['params']['goodstype'])}
                                            <p class="minprice">￥{$goodsitem['price']}</p>
                                        {else}
                                            <p>
                                                {if $goodsitem['price']==0&&$goodsitem['credit']==0}免费
                                                {elseif $goodsitem['price']>0&&$goodsitem['credit']==0}{$goodsitem['price']}<small>{$textyuan}</small>
                                                {elseif $goodsitem['price']==0&&$goodsitem['credit']>0}{$goodsitem['credit']}<small>{$textjifen}</small>
                                                {elseif $goodsitem['price']>0&&$goodsitem['credit']>0}{$goodsitem['credit']}<small>{$textjifen}</small>+{$goodsitem['price']}<small>{$textyuan}</small>{/if}
                                            </p>
                                        {/if}
                                        {if (!empty($diyitem['params']['showproductprice']) && $goodsitem['productprice']>0 && $goodsitem['productprice']>$goodsitem['price']) || $diyitem['params']['showsales']==1}
                                            <p class="productprice">
                                                {if !empty($diyitem['params']['showproductprice']) && $goodsitem['productprice']>0 && $goodsitem['productprice']>$goodsitem['price']}
                                                    <span style="color: {$diyitem['style']['productpricecolor']};">{php echo !empty($diyitem['params']['productpricetext'])?$diyitem['params']['productpricetext']:'原价'}:<span {if !empty($diyitem['params']['productpriceline'])}style="text-decoration: line-through;"{/if}>￥{$goodsitem['productprice']}</span></span>
                                                {/if}
                                                {if $diyitem['params']['showsales']==1}
                                                    <span style="color: {$diyitem['style']['salescolor']};">{php echo !empty($diyitem['params']['salestext'])?$diyitem['params']['salestext']:'销量'}: {$goodsitem['sales']}</span>
                                                {/if}
                                            </p>
                                        {/if}
                                    </span>
                                    {if !empty($diyitem['style']['buystyle']) && empty($goodsitem['bargain']) && empty($diyitem['params']['goodstype'])}
                                        {if $diyitem['style']['buystyle']=='buybtn-1'}
                                            <span class="buy" style="background-color: {$diyitem['style']['buybtncolor']};"><i class="icon icon-cart"></i></span>
                                        {elseif $diyitem['style']['buystyle']=='buybtn-2'}
                                            <span class="buy" style="background-color: {$diyitem['style']['buybtncolor']};"><i class="icon icon-add"></i></span>
                                        {elseif $diyitem['style']['buystyle']=='buybtn-3'}
                                            <span class="buy buybtn-3" style="background-color: {$diyitem['style']['buybtncolor']};">购买</span>
                                        {/if}
                                    {elseif !empty($goodsitem['bargain'])}
                                        <span class="buy" style="background-color: {$diyitem['style']['buybtncolor']};">砍</span>
                                    {elseif !empty($diyitem['params']['goodstype'])}
                                        <span class="buy buybtn-3" style="background-color: {$diyitem['style']['buybtncolor']};">{if !empty($goodsitem['ctype'])}抽奖{else}兑换{/if}</span>
                                    {/if}
                                </div>
                            {/if}
                        </div>
                    {/if}
                    {if $goodsitem['total']<=0 && empty($diyitem['params']['goodstype'])}
                        <div class="salez" style="background-image: url('{php echo tomedia($_W['shopset']['shop']['saleout'])}'); "></div>
                    {/if}
                </a>
            {/loop}
        </div>
    {else}
        <div class="swiper swiper-{$diyitemid}" data-element=".swiper-{$diyitemid}" data-view="{if $diyitem['style']['liststyle']=='block three'}3{elseif $diyitem['style']['liststyle']=='block one'}1{else}2{/if}" data-free="true" data-btn="true">
            <div class="swiper-container fui-goods-group {$diyitem['style']['liststyle']}" style="background: {$diyitem['style']['background']};">
                <div class="swiper-wrapper">
                    {loop $diyitem['data'] $goodsitem}
                    <a class="swiper-slide fui-goods-item" data-goodsid="{$goodsitem['gid']}" href="{php echo mobileUrl(empty($diyitem['params']['goodstype'])?'goods/detail':'creditshop/detail', array('id'=>$goodsitem['gid']))}" data-nocache="true" style="position: relative;">
                        <div class="image" style="background-image: url({php echo tomedia($goodsitem['thumb'])})">
                            {if $diyitem['params']['showicon']==1 || $diyitem['params']['showicon']==2}
                                <div class="goodsicon {$diyitem['params']['iconposition']}"
                                     {if $diyitem['params']['iconposition']=='left top'}
                                        style="top: {$diyitem['style']['iconpaddingtop']}px; left: {$diyitem['style']['iconpaddingleft']}px; text-align: left;"
                                     {elseif $diyitem['params']['iconposition']=='right top'}
                                        style="top: {$diyitem['style']['iconpaddingtop']}px; right: {$diyitem['style']['iconpaddingleft']}px; text-align: right;"
                                     {elseif $diyitem['params']['iconposition']=='left bottom'}
                                        style="bottom: {$diyitem['style']['iconpaddingtop']}px; left: {$diyitem['style']['iconpaddingleft']}px; text-align: left;"
                                     {elseif $diyitem['params']['iconposition']=='left bottom'}
                                        style="bottom: {$diyitem['style']['iconpaddingtop']}px; right: {$diyitem['style']['iconpaddingleft']}px; text-align: right;"
                                     {/if}
                                 >
                                    {if $diyitem['params']['showicon']==1}
                                        <img src="../addons/ewei_shopv2/plugin/diypage/static/images/default/goodsicon-{$diyitem['style']['goodsicon']}.png" style="width: {$diyitem['style']['iconzoom']}%;" />
                                    {elseif $diyitem['params']['showicon']==2 && !empty($diyitem['params']['goodsiconsrc'])}
                                        <img src="{php echo tomedia($diyitem['params']['goodsiconsrc'])}" onerror="this.src=''" style="width: {$diyitem['style']['iconzoom']}%;" />
                                    {/if}
                                </div>
                            {/if}
                        </div>
                        {if $diyitem['params']['showtitle']==1 || $diyitem['params']['showprice']==1}
                            <div class="detail">
                                {if $diyitem['params']['showtitle']==1}
                                    <div class="name" style="color: {$diyitem['style']['titlecolor']}; ">
                                        {if $goodsitem['bargain']>0}
                                        <label style="background-color: {$diyitem['style']['buybtncolor']}; padding: 0px 2px; color: #fff; font-size: 0.6rem">砍价</label>
                                        {/if}
                                        {if !empty($diyitem['params']['goodstype']) && $diyitem['params']['showtag']>0}
                                            <label style="background-color: {$diyitem['style']['tagbackground']}; padding: 0px 2px; color: #fff; font-size: 0.6rem">{if $diyitem['params']['showtag']==1&&$goodsitem['productprice']>0}￥{$goodsitem['productprice']}{elseif $diyitem['params']['showtag']==2}{if $goodsitem['gtype']==0}商品{elseif $goodsitem['gtype']==1}优惠券{elseif $goodsitem['gtype']==2}余额{elseif $goodsitem['gtype']==3}红包{/if}{elseif $diyitem['params']['showtag']==3}{if $goodsitem['ctype']==1}抽奖{else}兑换{/if}{/if}</label>
                                        {/if}
                                        {$goodsitem['title']}
                                    </div>
                                {/if}
                                {if $diyitem['params']['showprice']==1}
                                <div class="price" {if empty($diyitem['params']['goodstype'])}style="border-top: 1px dashed #eee;"{/if}>
                                        <span class="text" style="color: {$diyitem['style']['pricecolor']};">
                                            {if empty($diyitem['params']['goodstype'])}
                                                <p class="minprice">￥{$goodsitem['price']}</p>
                                            {else}
                                                <p>
                                                    {if $goodsitem['price']==0&&$goodsitem['credit']==0}免费
                                                    {elseif $goodsitem['price']>0&&$goodsitem['credit']==0}{$goodsitem['price']}<small>{$textyuan}</small>
                                                    {elseif $goodsitem['price']==0&&$goodsitem['credit']>0}{$goodsitem['credit']}<small>{$textjifen}</small>
                                                    {elseif $goodsitem['price']>0&&$goodsitem['credit']>0}{$goodsitem['credit']}<small>{$textjifen}</small>+{$goodsitem['price']}<small>{$textyuan}</small>{/if}
                                                </p>
                                            {/if}
                                            {if (!empty($diyitem['params']['showproductprice']) && $goodsitem['productprice']>0 && $goodsitem['productprice']>$goodsitem['price']) || $diyitem['params']['showsales']==1}
                                                <p class="productprice">
                                                    {if !empty($diyitem['params']['showproductprice']) && $goodsitem['productprice']>0 && $goodsitem['productprice']>$goodsitem['price']}
                                                        <span style="color: {$diyitem['style']['productpricecolor']};">{php echo !empty($diyitem['params']['productpricetext'])?$diyitem['params']['productpricetext']:'原价'}:<span {if !empty($diyitem['params']['productpriceline'])}style="text-decoration: line-through;"{/if}>￥{$goodsitem['productprice']}</span></span>
                                                    {/if}
                                                    {if $diyitem['params']['showsales']==1}
                                                        <span style="color: {$diyitem['style']['salescolor']};">{php echo !empty($diyitem['params']['salestext'])?$diyitem['params']['salestext']:'销量'}: {$goodsitem['sales']}</span>
                                                    {/if}
                                                </p>
                                            {/if}
                                        </span>
                                        {if !empty($diyitem['style']['buystyle']) && empty($goodsitem['bargain']) && empty($diyitem['params']['goodstype'])}
                                        {if $diyitem['style']['buystyle']=='buybtn-1'}
                                        <span class="buy" style="background-color: {$diyitem['style']['buybtncolor']};"><i class="icon icon-cart"></i></span>
                                        {elseif $diyitem['style']['buystyle']=='buybtn-2'}
                                        <span class="buy" style="background-color: {$diyitem['style']['buybtncolor']};"><i class="icon icon-add"></i></span>
                                        {elseif $diyitem['style']['buystyle']=='buybtn-3'}
                                        <span class="buy buybtn-3" style="background-color: {$diyitem['style']['buybtncolor']};">购买</span>
                                        {/if}
                                        {elseif !empty($goodsitem['bargain'])}
                                        <span class="buy" style="background-color: {$diyitem['style']['buybtncolor']};">砍</span>
                                        {elseif !empty($diyitem['params']['goodstype'])}
                                        <span class="buy buybtn-3" style="background-color: {$diyitem['style']['buybtncolor']};">{if !empty($goodsitem['ctype'])}抽奖{else}兑换{/if}</span>
                                        {/if}
                                    </div>
                                {/if}
                            </div>
                        {/if}
                        {if $goodsitem['total']<=0 && empty($diyitem['params']['goodstype'])}
                            <div class="salez" style="background-image: url('{php echo tomedia($_W['shopset']['shop']['saleout'])}'); "></div>
                        {/if}
                    </a>
                    {/loop}
                </div>

                <div class="swiper-button-next swiper-button-white"></div>
                <div class="swiper-button-prev swiper-button-white"></div>
            </div>
        </div>
    {/if}
{/if}